package com.hog.web.controller.reptiles;

import com.hog.service.reptiles.IReptilesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 爬虫相关接口
 *
 * @author 唐晴
 * @date 2020年08月05日
 * @since JDK 1.8
 */
@Controller
@RequestMapping("/reptiles")
public class ReptilesContorller {
    @Autowired
    private IReptilesService reptilesService;

    /**
     * 爬取码迷站
     * http://www.mamicode.com/
     *
     * @return
     */
    @GetMapping("/mami")
    public String mami() {
        reptilesService.reptilesMaMi();
        return "mami";
    }

    /**
     * 展示
     *
     * @return
     */
    @GetMapping("/detail")
    public String detail() {
        return "mami";
    }

    /**
     * 删除异常数据
     *
     * @return
     */
    @GetMapping("/deleteErrList")
    public String deleteErrList() {
        reptilesService.deleteErrList();
        return "mami";
    }
}